<!--初始化  setup-->
<script lang="ts">
export default {
  setup() {
    let num: number = 10;

    function getNum() {
      console.log('点击')
      console.log(num)
    }

    return {
      num,
      getNum
    }
  }
}
</script>

<template>
  这是index1
  {{ num }}
  <button @click="getNum">getNum</button>
</template>

<style scoped lang="less">

</style>
